package com.cee.service.Impl;

import com.cee.dao.ExamJudgeMapper;
import com.cee.model.ExamJudge;
import com.cee.service.ExamJudgeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Slf4j
@Service
@Transactional
public class ExamJudgeServiceImpl implements ExamJudgeService {

    @Autowired
    private ExamJudgeMapper examJudgeMapper;

    @Override
    public int deleteExamJudgeById(Integer id) {
       return examJudgeMapper.deleteById(id);
    }

    @Override
    public int saveExamJudge(ExamJudge examJudge) {
       return examJudgeMapper.insert(examJudge);
    }

    @Override
    public List<ExamJudge> getListByExamId(Integer examId) {
        return examJudgeMapper.getListByExamId(examId);
    }

    @Override
    public void updateExamJudge(ExamJudge examJudge) {
        examJudgeMapper.updateExamJudge(examJudge);
    }
}
